package main

import (
	"fmt"
)

func main() {
	intArr := [5]int{12, 5, 95, 4, 1}
	bubble(&intArr)
	fmt.Println("after sotred intArr=", intArr)
}

func bubble(intArrPoint *[5]int) {
	// panic("unimplemented")
	for i := 0; i < len(intArrPoint)-1; i++ {
		for j := 0; j < len(intArrPoint)-1; j++ {
			if (*intArrPoint)[j+1] < (*intArrPoint)[j] {
				temp := (*intArrPoint)[j+1]
				(*intArrPoint)[j+1] = (*intArrPoint)[j]
				(*intArrPoint)[j] = temp
			}
		}
	}
}
